import './App.css';

//rcc 生成类组件
//rsf 生成函数式组件

import React, { Component } from 'react';
import { Route, Redirect, Switch } from 'react-router-dom';

import Register from "./views/Register.jsx";
import Login from "./views/Login.jsx";
import Index from './views/Index.jsx';
import Good from './views/Good.jsx';
import Like from './views/Like.jsx';
import Set from './views/Set.jsx';



class App extends Component {
  render() {
    return (
      <div className='app'>
        <Switch>
          <Route path='/register' component={Register} />
          <Route path='/login' component={Login} />
          <Route path='/index' component={Index} />
          <Route path='/good' component={Good} />
          <Route path='/like' component={Like} />
          <Route path='/set' component={Set} />
          <Redirect from='/' to='/index' />
        </Switch>
      </div>
    );
  }
}

export default App;